package com.mce.nebula.dto;

import com.mce.nebula.entity.TeamRole;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 团队角色响应DTO
 */
@Data
public class TeamRoleResponse {
    
    private Long id;
    private String roleId;
    private String tenantId;
    private String roleName;
    private String roleAlias;
    private String description;
    private Boolean isActive;
    private String enterpriseId;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    
    // 权限列表
    private List<TeamRolePermissionResponse> permissions;
    
    public TeamRoleResponse(TeamRole teamRole) {
        this.id = teamRole.getId();
        this.roleId = teamRole.getRoleId();
        this.tenantId = teamRole.getTenantId();
        this.roleName = teamRole.getRoleName();
        this.roleAlias = teamRole.getRoleAlias();
        this.description = teamRole.getDescription();
        this.isActive = teamRole.getIsActive();
        this.enterpriseId = teamRole.getEnterpriseId();
        this.createTime = teamRole.getCreateTime();
        this.updateTime = teamRole.getUpdateTime();
    }
}





